package com.yanqu.road.entity.travelbook;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

/**
 * @Author : Cxp
 * @Time : 2024-12-31
 * @Description : 旅行册用户数据
 */

@FieldTypeAnnotation(tableName = "t_u_travel_book_data", autoSave = true, desc = "旅行册用户数据")
public class TravelBookUserData extends DataObject {
    @FieldTypeAnnotation(desc = "用户Id", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "引导索引")
    private int guideIdx;

    @FieldTypeAnnotation(desc = "是否进行过一次性回收")
    private boolean onceRecycle;

    public TravelBookUserData() {}

    public TravelBookUserData(long userId, int guideIdx) {
        this.userId = userId;
        this.guideIdx = guideIdx;
        setInsertOption();
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getGuideIdx() {
        return guideIdx;
    }

    public void setGuideIdx(int guideIdx) {
        if (this.guideIdx != guideIdx) {
            this.guideIdx = guideIdx;
            setOp(DataStatus.Update);
        }
    }

    public boolean getOnceRecycle() {
        return onceRecycle;
    }

    public void setOnceRecycle(boolean onceRecycle) {
        if (this.onceRecycle != onceRecycle) {
            this.onceRecycle = onceRecycle;
            setOp(DataStatus.Update);
        }
    }
}
